package com.feng.yupaoback.service;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.feng.yupaoback.pojo.dto.TeamJoinRequest;
import com.feng.yupaoback.pojo.dto.TeamQueryRequest;
import com.feng.yupaoback.pojo.dto.TeamQuitRequest;
import com.feng.yupaoback.pojo.dto.TeamUpdateRequest;
import com.feng.yupaoback.pojo.entity.Team;
import com.baomidou.mybatisplus.extension.service.IService;
import com.feng.yupaoback.pojo.entity.User;
import com.feng.yupaoback.pojo.vo.TeamUserVO;

import java.util.List;

/**
* @author 34689
* @description 针对表【yu_pao_team(队伍)】的数据库操作Service
* @createDate 2025-07-14 19:13:40
*/
public interface TeamService extends IService<Team> {

    Page<Team> getTeamListPage(String text, long pageNum, int status);

    long addTeam(Team team, User loginUser);

    List<TeamUserVO> getTeamList(TeamQueryRequest teamQueryRequest, boolean isAdmin);

    boolean updateTeam(TeamUpdateRequest teamUpdateRequest, User loginUser);

    boolean joinTeam(TeamJoinRequest teamJoinRequest, User loginUser);

    boolean quitTeam(TeamQuitRequest teamQuitRequest, User loginUser);

    boolean deleteTeam(long id, User loginUser);

    int getJoinNumber(User loginUser);
}
